DROP TABLE IF EXISTS jms_ods.yl_lmdm_sys_settlement_dest;
CREATE EXTERNAL TABLE jms_ods.yl_lmdm_sys_settlement_dest(
 ID bigint comment "",  --NUMBER(11)
 NAME string comment "名称",  --NVARCHAR2(100)
 CODE string comment "编码",  --NVARCHAR2(30)
 COUNTRY_ID bigint comment "所属国家",  --NUMBER(11)
 PROVIDER_ID bigint comment "省份ID",  --NUMBER(11)
 CITY_ID bigint comment "城市ID",  --NUMBER(11)
 REGIONAL_ID bigint comment "大区ID",  --NUMBER(11)
 AREA_ID bigint comment "区/县ID",  --NUMBER(11)
 SERVICE_OUTLET_ID bigint comment "服务网点ID",  --NUMBER(11)
 DISTRIBUTION_ID bigint comment "所属分拨ID",  --NUMBER(11)
 IS_PAY bigint comment "是否到付",  --NUMBER(11)
 IS_IDENTIFICATION_ID bigint comment "是否显示标识",  --NUMBER(11)
 IS_COLLECTION_ID bigint comment "是否代收",  --NUMBER(11)
 IS_RECEIPT bigint comment "是否回单",  --NUMBER(11)
 EXPRESS_TYPE bigint comment "快递类型",  --NUMBER(11)
 IS_ENABLE smallint comment "是否启用:1启用,2不启用",  --NUMBER(4)
 IS_DELETE smallint comment "是否删除:1未删除,2已删除",  --NUMBER(4)
 FINANCIAL_NETWORK_ID bigint comment "财务中心网点ID",  --NUMBER(11)
 CREATE_BY bigint comment "创建人ID",  --NUMBER(11)
 UPDATE_BY bigint comment "最后更新人ID",  --NUMBER(11)
 CREATE_BY_NAME string comment "创建人名称",  --NVARCHAR2(50)
 UPDATE_BY_NAME string comment "最后修改人名称",  --NVARCHAR2(50)
 CREATE_TIME timestamp comment "创建时间",  --DATE
 UPDATE_TIME timestamp comment "更新时间",  --DATE
 VERSION string comment "版本号",  --NVARCHAR2(10)
 SORT smallint comment "排序"  --NUMBER(4)
 )
 COMMENT '结算目的地'
 PARTITIONED BY (dt STRING COMMENT '更新/创建日期 (yyyy-MM-dd)')
 STORED AS PARQUET
 LOCATION '/dw/hive/jms_ods.db/external/yl_lmdm_sys_settlement_dest'
 TBLPROPERTIES (
 'discover.partitions'='false',
 'parquet.column.index.access'='true'
 );

MSCK REPAIR TABLE jms_ods.yl_lmdm_sys_settlement_dest;